<?php
	extract($_POST);
  	require('db.php');
  	$sql = "SELECT * FROM dextrob_user WHERE login='".$login."' OR email='".$mail."'";
    $req = mysql_query($sql);
    $nbr = mysql_num_rows($req);
    if($nbr == 0){
    	$sql2 = "INSERT INTO dextrob_user (id,login,pass,email) VALUES ('', '".$login."','".sablage($pass)."', '".$mail."')";
       	$req2 = mysql_query($sql2) or die($alerte = "-1");
		$alerte = sablage($pass).' '.mysql_insert_id();//connection
	}else{
		$alerte = "0";//login ou mdp existant
	}
	mysql_close();
	echo $alerte;
?>